#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solve()
{
    int n, m, k;
    cin >> n >> m >> k;
    vector<vector<int>> v(n, vector<int>(m, 0));
    if (k < max(n, m))
    {
        cout << -1;
        return;
    }
    if (n > m)
    {
        for (int i = 0; i < m; i++)
            v[i][i] = 1;
        for (int i = m; i < n - 1; i++)
            v[i][0] = 1;
        v[n - 1][0] = k - n + 1;
    }
    else if (n < m)
    {
        for (int i = 0; i < n; i++)
            v[i][i] = 1;
        for (int i = n; i < m - 1; i++)
            v[0][i] = 1;
        v[0][m - 1] = k - m + 1;
    }
    else
    {
        for (int i = 0; i < n - 1; i++)
            v[i][i] = 1;
        v[n - 1][n - 1] = k - n + 1;
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
            cout << v[i][j] << ' ';
        cout << endl;
    }
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    //cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}